﻿<%@ Page language="c#" Codebehind="Contact_Client.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.CM.Stat.Contact_Client" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>Contact_Client</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/other.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/table.css" />

<script language="JavaScript" src="../../../Css/meizzDate.js"></script>
<script language="javascript">
function fillstring(str)
{
	if(str.length==1)
	{
		str = "0" + str; 
	}
	return(str);
}
function quickseldate(type)
{
	var begintime,endtime;
	var oneminute = 60*1000;
	var onehour   = 60*oneminute;
	var oneday    = 24*onehour;
	var oneweek   = 7*oneday;
	
	var todayDate = new Date();
	var date = todayDate.getDate();
	var month= todayDate.getMonth() +1;
	var year= todayDate.getYear();
	var day = todayDate.getDay();
	if(navigator.appName == "Netscape")
	{
		year = 1900 + year;
	}

	//-->
				
	if(type=="day")
	{
		begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
		endtime = begintime;
	}
	else if(type=="week")
	{
		var daytoMon = day-1;
		if(day==0) 
			daytoMon = 6;
		
		todayDate.setTime(todayDate.getTime()-daytoMon*oneday);
		date = todayDate.getDate();
		month= todayDate.getMonth() +1;
		year= todayDate.getYear();
		day = todayDate.getDay();
		
		begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
		
		todayDate.setTime(todayDate.getTime()+6*oneday);
		
		date = todayDate.getDate();
		month= todayDate.getMonth() +1;
		year= todayDate.getYear();
		
		endtime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
	}
	else if(type=="month")
	{
		var dateto1 = date-1;
		
		todayDate.setTime(todayDate.getTime()-dateto1*oneday);
		date = todayDate.getDate();
		month= todayDate.getMonth() +1;
		year= todayDate.getYear();
		day = todayDate.getDay();
		
		begintime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());
		
		todayDate.setMonth(month);
		todayDate.setTime(todayDate.getTime()-oneday);
		
		date = todayDate.getDate();
		month= todayDate.getMonth() +1;
		year= todayDate.getYear();
		
		endtime = year.toString() + "-" + fillstring(month.toString()) + "-" + fillstring(date.toString());

	}

	document.getElementById("tbx_begintime").value = begintime;
	document.getElementById("tbx_endtime").value = endtime;

}
</script>
</head>
<body>
<form id="Contact_Client" method="post" runat="server">
  <div class="m">
    <div class="path"><a href="/SubModule/UnitiveDocument/Desktop.aspx">我的桌面</a> >> 我的客户 >>　汇总</div>
    <div class="con">
				<table id="Table1" bordercolor="#93BEE2" border="1">
					<tr>
						<td>开始时间
							<asp:textbox id="tbx_begintime" onfocus="setday(this);" CssClass="inputcss" runat="server" readonly="True"></asp:textbox>&nbsp;
							<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="tbx_begintime" display="Dynamic"
								errormessage="*"></asp:requiredfieldvalidator>结束时间
							<asp:textbox id="tbx_endtime" onfocus="setday(this);"  CssClass="inputcss"  runat="server" readonly="True"></asp:textbox>&nbsp;
							<asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="tbx_endtime" errormessage="*"></asp:requiredfieldvalidator><asp:radiobutton id="rbtn_thisweek" onclick="quickseldate('week');" runat="server" groupname="quickselect"
								text="本周"></asp:radiobutton><asp:radiobutton id="rbtn_thismonth" onclick="quickseldate('month');" runat="server" groupname="quickselect"
								text="本月"></asp:radiobutton>&nbsp;
							<asp:button id="btn_OK" runat="server" text="确定" cssclass="redbuttoncss" width="48px"></asp:button></td>
					</tr>
					<tr>
						<td align="center">
							<table id="Table2" cellspacing="1" cellpadding="1" width="100%" border="1">
								<tr style="background:#93BEE2;">
									<td style="width: 248px">明细</td>
									<td>点击数字查看详情</td>
									<td style="width: 274px" >明细</td>
									<td>点击数字查看详情</td>
								</tr>
								<tr>
									<td>添加接触记录的销售人员数：</td>
									<td><a onclick="javascript:window.open('sellman.aspx?begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#"><asp:literal id="ltl_AddContactSellman" runat="server"></asp:literal></a>
									</td>
									<td>接触总数：
									</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=ac&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#"><asp:literal id="ltl_Contact" runat="server"></asp:literal></a></td>
								</tr>
								<tr>
									<td>拜访客户次数：
									</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=cc&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#"><asp:literal id="ltl_CallinContact" runat="server"></asp:literal></a></td>
									<td>新发现客户数：</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=nc&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_NewClient" runat="server"></asp:literal></a></td>
								</tr>
								<tr>
									<td>进入商务谈判的客户数（新）：</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=neonc&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_NegotiateClient_New" runat="server"></asp:literal></a></td>
									<td>3星以上的客户数量（新）：</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=n3c&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_New3Client_New" runat="server"></asp:literal></a></td>
								</tr>
								<tr>
									<td>进入商务谈判的客户数（总）：</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=neoc&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_NegotiateClient_Total" runat="server"></asp:literal></a></td>
									<td>3星以上的客户数量（总）：</td>
									<td><a onclick="javascript:window.open('contactedclient.aspx?type=3c&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_New3Client_Total" runat="server"></asp:literal></a></td>
								</tr>
								<tr>
									<td>发生费用总数：</td>
									<td><a onclick="javascript:window.open('fee.aspx?type=client&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_Fee" runat="server"></asp:literal></a></td>
									<td>发生费用次数：</td>
									<td><a onclick="javascript:window.open('fee.aspx?type=sellman&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_FeeTimes" runat="server"></asp:literal></a></td>
								</tr>
								<tr>
									<td>发生费用客户数：</td>
									<td><a onclick="javascript:window.open('fee.aspx?type=client&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_FeeClient" runat="server"></asp:literal></a></td>
									<td>发生费用销售人员数：</td>
									<td><a onclick="javascript:window.open('fee.aspx?type=sellman&amp;begintime='+document.Contact_Client.tbx_begintime.value+'&amp;endtime='+document.Contact_Client.tbx_endtime.value),'_blank'"
											href="#">
											<asp:literal id="ltl_FeeSellman" runat="server"></asp:literal></a></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
    </div>
  </div>
</form>
</body>
</html>
